### Project 3 Bluetooth Data Transmission
**1.Hardware Overview**
Master Bluetooth module (straight-pin version):

The DX-BT24 master Bluetooth module uses the Dialog 14531 chip, complies with the BLE 5.1 protocol, and provides transparent wireless transmission via UART.
Default serial settings: **9600 bps / 8 data bits / no parity / 1 stop bit**.
Key features
- Flexible baud-rate and name configuration
- Ultra-low power: 2 µA
- Master/slave LOS range: 20 m / 90 m
- Up to 115 200 bps transparent throughput
***2.Master-Slave Bluetooth Module Pairing***
**Method One:BT24 One-Click Master–Slave Pairing (No AT Commands)**
This method requires **no AT commands**—the first pairing and bind information are completed solely with the **on-board buttons**.
**(1)Procedure**
(The gesture-control kit includes a BT24 master module. A BT24 slave module—typically mounted on a smart car—must be purchased separately. The demo below uses the keyestudio mecanum-wheel car.)
Prepare
Both BT24 modules (master and slave) are powered correctly and not connected to other devices.
After power-up, both indicator LEDs blink, meaning “not connected”.

Press Buttons Simultaneously
**Long-press** the buttons on both modules for about 3–5 s until the LEDs on both sides **change from blinking to solid ON**
- Blinking → searching/pairing
- Solid ON → paired and connected

Pairing Complete
Release the buttons. A steady LED indicates that the **transparent link is established** and will auto-reconnect after power loss.

**(2)Status & Indicator LED**
| LED State | Module Status | Action |
| ---------------------------- | --------------------------------- | ------------------------------------------------------ |
| Blinking | Not connected / waiting to pair | No action needed, or long-press again to enter pairing |
| Solid ON | Connected / transparent link open | Ready to send & receive data |
| Blinking (after short press) | Clear binding | Short-press once to erase pairing info |
To pair with a new device: short-press the buttons on master and slave → LEDs blink → repeat steps 3.1.
***Method 2: (Using Your Own USB-to-TTL Module)***
***Of course, if you have a USB-to-TTL module, refer to Method Two—you only need to manually pair once, and subsequent Bluetooth master-slave modules will achieve automatic pairing.***
1.Connect the Bluetooth module to the UAB-to-TTL module as follows:

2.Connect the USB-to-TTL module to your computer. Open the Arduino Serial Monitor, select the port for the USB-to-TTL module, set the baud rate to 9600, send the command “AT+LADDR”, and record the received value.

3.Remove the Bluetooth slave module from the USB-to-TTL converter. Connect the Bluetooth master module to the USB-to-TTL converter using the same method. Send the command AT+BIND (e.g., AT+BIND48872D6F9B85). After a brief wait, you will see a prompt similar to the following, indicating successful binding.

4.After successful connection, attach the Bluetooth master module to the glove and connect it to the cart. Once both are powered on, the two Bluetooth devices will automatically pair. No further manual pairing is required.
***3.Arduino Sending Example***

Upload the following code to the glove's mainboard. Once the upload is complete, insert the Bluetooth master module into the glove's expansion board.
```c
void setup()
{
Serial.begin(9600);// Initialize the serial port, and set the baud rate to 9600
}
void loop()
{
Serial.println("A");
delay(500);
Serial.println("B");
delay(500);
}
```
After uploading the code, open the serial monitor for both the Bluetooth master module (glove, left side in the image below) and the Bluetooth slave module (provided by the user, right side in the image below). You can observe the transmitted and received data. Of course, if you don't have a slave module, you can just monitor the master module.

You should see the strings **“A”** and **“B”** alternating every 0.5 s.This confirms that the master’s data is transparently transmitted to the slave.
You have now completed **data transmission from the BT24 master to the slave** and can extend this approach to more complex wireless communication scenarios.